Fix memory leaks when using add_objects
authorPaolo Borelli <pborelli@gnome.org>
Fri, 14 Aug 2009 09:33:47 +0000 (11:33 +0200)
committerPaolo Borelli <pborelli@gnome.org>
Fri, 14 Aug 2009 13:56:44 +0000 (15:56 +0200)
gtk/gtkbuilderparser.c

index fa8942134d777a1a0bbeb36f500f7dcdbb73bd1a..b4f68551365caabc70406ce66f21bb0fd4d034bf 100644 (file)
@@ -380,7 +380,12 @@ parse_object (GMarkupParseContext  *context,
           data->inside_requested_object = TRUE;
         }
       else
-        return;
+        {
+          g_free (object_class);
+          g_free (object_id);
+          g_free (constructor);
+          return;
+        }
     }
 
   object_info = g_slice_new0 (ObjectInfo);